<?php

namespace app\shop\validate;

class GoodsValidate extends BaseValidate
{
    protected $rule = [
        'id'          => 'require|number',
        'classify_id' => 'require',
        'service_ids' => 'require'
    ];

    protected $message = [
        'id.require'          => '缺少商品ID',
        'id.number'           => '缺少商品ID',
        'classify_id.require' => '缺少分类ID',
        'service_ids.require' => '缺少服务ID',
    ];

    protected $scene = [
        'list'            => [''],
        'detail'          => ['id'],
        'classify'        => [''],
        'classify_detail' => ['classify_id'],
        'service'         => ['service_ids'],
        'share'           => ['id']
    ];
}
